<template>
	<view class="box">
		<view class="minbox" v-for="(item,index) in list" :key="index" @click="handerclick(item.id)">
			<view class="img">
				<image class="image" :src="item.img" mode=""></image>
				
			</view>
			<view class="right">
				<view class="text">{{item.name}}</view>
				<view class="minjia">
					<view class="tejia">{{item.price}}</view>
					<view class="fahuo">{{item.time}}</view>
				</view>
				<view class="minprice">
					<view class="price">{{item.jia }}</view>
					<view class="zhekou"> /箱 <del>{{item.youhui}}</del> </view>
				</view>
			</view>
			<view class="icon">
				<image  src="../../static/gouwu.png" mode=""></image>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					{id: "1",
						name: "东台8424西瓜1个装（单果3kg）8424西瓜",
						price: "特价",
						time: "商家24H发货",
						jia: "￥29.9",
						youhui: "￥45",
						img: "https://img1.baidu.com/it/u=2017971842,3513242633&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
						
					},
					{
						id: "1",
						name: "东台8424西瓜1个装（单果3kg）8424西瓜",
						price: "特价",
						time: "商家24H发货",
						jia: "￥29.9",
						youhui: "￥45",
						img: "https://img0.baidu.com/it/u=4237076002,1390959302&fm=253&fmt=auto&app=120&f=JPEG?w=768&h=432",
						
					},
					{
						id: "1",
						name: "东台8424西瓜1个装（单果3kg）8424西瓜",
						price: "特价",
						time: "商家24H发货",
						jia: "￥29.9",
						youhui: "￥45",
						img: "https://img1.baidu.com/it/u=3339749475,3489807364&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
						
					},
					{
						id: "1",
						name: "东台8424西瓜1个装（单果3kg）8424西瓜",
						price: "特价",
						time: "商家24H发货",
						jia: "￥29.9",
						youhui: "￥45",
						img: "https://img1.baidu.com/it/u=4129380059,2121209588&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
						
					},
					{
						id: "1",
						name: "东台8424西瓜1个装（单果3kg）8424西瓜",
						price: "特价",
						time: "商家24H发货",
						jia: "￥29.9",
						youhui: "￥45",
						img: "https://img1.baidu.com/it/u=2017971842,3513242633&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
						
					},
					//https://img0.baidu.com/it/u=1856787943,1520521770&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500
				]
			}
		},
		methods:{
			handerclick(id){
				console.log(id)
				uni.navigateTo({
					url:"/pages/detail/datail?id="+id  						//点击商品 携带商品参数跳转页面
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		display: flex;
		flex-direction: column;

		.minbox {
			position: relative;
			display: flex;
			height: 112px;
			padding: 10px;

			.img {
				width: 80px;
				height: 80px;
				margin-right: 10px;

				.image {
					width: 100%;
					height: 100%;

				}
			}

			.text {
				width: 260px;
				font-size: 16px;
			}

			.minjia {
				display: flex;
				width: 110px;
				font-size: 11px;
				justify-content: space-between;

				.tejia {
					border: 1px solid red;
					color: red;
				}

				.fahuo {
					border: 1px solid rgb(166, 153, 153);
					color: rgb(166, 153, 153);
				}
			}
			.minprice{
				display: flex;
				.price{
					font-size: 21px;
					font-weight: 400;
					color: red;
				}
				.zhekou{
					color: rgb(204,204,204);
					line-height: 30px;
				}
			}
			.icon{
				position: absolute;
				right: 10px;
				bottom: 45px;
				width: 42px;
				height: 42px;
				border-radius: 50%;
				text-align: center;
				vertical-align: top;
				overflow: hidden;
				image{
					width: 100%;
					height:100%;
					text-align: center;
				}
			}
		}
	}
</style>
